class @EditProfileModel extends Backbone.Model
    defaults:
        UserId: 0
        Email: ''
        Login: ''
        Status: 0
        Password: ''
        ConfirmPassword: ''
        Avatar: ''
        SuccessMessage: ''

    url: ->
        return encodeURI(SiteMap.Account.GetEdit)

    parse: (response)->
        attr =
            Email: response.Email
            Login: response.Login
            Status: response.Status
            UserId: response.UserId
        if response.Avatar?
            attr.Avatar = response.Avatar
        return attr